Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add withdraw method for batchers in servicemanager #872

Merged

Conversation

NicolasRampoldi
Copy link
Contributor

Description

  • Adds withdraw method for batchers in AlignedLayerServiceManager.

To Test

  • First, fund the batcher in the AlignedLayerServiceManager:
cast send <aligned_layer_service_manager_addr> --value 1ether --private-key <batcher_private_key>
  • Then, check the funds:
cast call <aligned_layer_service_manager_addr> "balanceOf(address)(uint256)" <batcher_addr>
  • Then, withdraw the funds:
cast send <aligned_layer_service_manager_addr> "withdraw(uint256)" 0.5ether --private-key <batcher_private_key>
  • Lastly, check the funds again:
cast call <aligned_layer_service_manager_addr> "balanceOf(address)(uint256)" <batcher_addr>

@NicolasRampoldi NicolasRampoldi linked an issue Aug 27, 2024 that may be closed by this pull request
@NicolasRampoldi NicolasRampoldi self-assigned this Aug 27, 2024
Copy link

github-actions bot commented Aug 27, 2024

Changes to gas cost

Generated at commit: 620f0e09204a4255ab5498a8384bbde518e18326, compared to commit: 61624d9f47e04ec153c619990967357ba4d09acb

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
AlignedLayerServiceManager receive +33 ❌ +0.07%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
AlignedLayerServiceManager 4,412,695 (+53,659) receive 44,965 (+33) +0.07% 44,965 (+33) +0.07% 44,965 (+33) +0.07% 44,965 (+33) +0.07% 256 (0)

@NicolasRampoldi NicolasRampoldi force-pushed the 870-add-withdraw-method-for-batchers-in-servicemanager branch from 5aa96a2 to e2b4a5b Compare August 27, 2024 17:41
@NicolasRampoldi NicolasRampoldi merged commit 2274416 into main Aug 27, 2024
3 checks passed
@NicolasRampoldi NicolasRampoldi deleted the 870-add-withdraw-method-for-batchers-in-servicemanager branch August 27, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add withdraw method for Batchers in ServiceManager
4 participants